/**
 * Collaborative Story Development Web Application (CSDApp) 
 * Copyright Anton Strack 2014
 *
 * This file is part of Collaborative Story Development Application (CSDApp).
 *
 * CSDApp is free software: you can redistribute it and/or modify it under the
 * terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or any later version.
 *
 * CSDApp is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * CSDApp. If not, see <http://www.gnu.org/licenses/>.
 *
 */
package csdwa;

/**
 * The enumeration lists the query place holders used by the dao's to complete
 * building the sql query templates.
 *
 * @author Anton Strack
 */
public enum QueryMarker {

    CORE_COLUMNS("${columns}"), CORE_TABLE("${tables}"), CORE_CONDITIONS("${conditions}"), INSERT_VALUES("${insertValues}"), ORDER_BY_COLUMN("${orderByColumn}"), ORDER_BY_MODE("${orderByMode}"), UPDATE_COLUMNS_VALUES("${updateColumnsValues}"), LIMIT("${limit}"), RELATED_TABLES("${relatedTables}"), RELATED_COLUMNS("${relatedColumns}"), RELATED_CONDITIONS("${relatedConditions}"), DERIVED_TABLES("${derivedTables}"), DERIVED_COLUMNS("${derivedColumns}"), DERIVED_CONDITIONS("${derivedConditions}"), PRIMARY_KEY("${id}");
    private final String name;

    /**
     * Set the name of the query marker.
     *
     * @param value the value to set as the internal name of the query marker.
     */
    private QueryMarker(String value) {
        this.name = value;
    }

    /**
     * Provide access to the internal name of the query marker.
     *
     * @return the string value name of the query marker.
     */
    @Override
    public String toString() {
        return this.name;
    }
}
